package cn.com.ejiakanghu.web;

import cn.com.ejiakanghu.annotation.LoginUser;
import cn.com.ejiakanghu.core.vo.BaseResult;
import cn.com.ejiakanghu.dto.HospitalOrderListVo;
import cn.com.ejiakanghu.service.HospitalManage;
import cn.com.ejiakanghu.vo.UpdateDeviceStatusVo;
import org.linlinjava.litemall.core.util.ResponseUtil;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author wj
 * @date 2022/1/21 15:18
 */
@RestController
@RequestMapping("/hospital")
public class HospitalController {

    @Resource
    private HospitalManage hospitalManage;

 //--------------导医台接口---------------------------

    /**
     * 医院管理-设备管理-获取设备列表
     */
    @PostMapping("/deviceList")
    public BaseResult deviceList(@LoginUser Integer userId){

        return hospitalManage.deviceList(userId);
    }

    /**
     * 医院管理-预约订单-获取订单列表
     */
    @PostMapping("/orderList")
    public BaseResult orderList(@LoginUser Integer userId,HospitalOrderListVo hospitalOrderListVo){
        return hospitalManage.orderList(userId,hospitalOrderListVo);
    }


    /**
     * 医院管理-设备管理-变更设备状态
     */
    @PostMapping("/updateDeviceStatus")
    public BaseResult updateDeviceStatus(@LoginUser Integer userId, UpdateDeviceStatusVo updateDeviceStatusVo){
        return hospitalManage.updateDeviceStatus(userId,updateDeviceStatusVo);
    }

}
